home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple Developer Connection Student Program
/
ADC Tools Sampler CD Disk 3 1999.iso
/
Documentation
/
Books
/
Learn Java on the Macintosh
/
Learn Java Projects
/
09.04 - variable
/
ClassVar.java
< prev
next >
Wrap
Text File
|
1996-04-22
|
582b
|
25 lines
/* -------------------------------------------------------------
This applet shows a simple example of accessing a class variable.
Java's classes: Applet (applet)
System (lang)
Custom classes: ClassVar
------------------------------------------------------------- */
public class ClassVar extends java.applet.Applet {
static int test = 20;
public void init() {
System.out.println("test = " + test);
int test = 30;
System.out.println("test = " + test);
System.out.println("ClassVar.test = " + ClassVar.test);
}
}